package pe.com.bbva.ge.persistencia.orm.test;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import pe.com.bbva.ge.domain.base.Auditoria;

@Entity
@Table(name = "CABECERA")
public class Cabecera extends Auditoria {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2904066380139280642L;

	@Id
	@Column
	private long id;
	
	@Column
	private String numero;
	
	@OneToMany(mappedBy="cabecera", cascade=CascadeType.ALL)
	private List<Detalle> detalles;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getNumero() {
		return numero;
	}

	public void setNumero(String numero) {
		this.numero = numero;
	}

	public List<Detalle> getDetalles() {
		return detalles;
	}

	public void setDetalles(List<Detalle> detalles) {
		this.detalles = detalles;
	}

}
